<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="jypath" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html >
<html  lang="en">
<head>
    <meta charset="utf-8">
    <title>修改组团</title>
    <%@include file="../../common/operation_forbid.jsp" %>
    <%@include file="../../common/jsVersion.jsp" %>
    <link href="${jypath}/resources/css/upload.css" rel="stylesheet" type="text/css" />
	<link rel="stylesheet" href="${jypath}/static/css/strip.css" />
 	<script src="${jypath}/resources/js/jquery.min.js" type="text/javascript"></script>
	<!-- layer弹窗插件-->
	<script src="${jypath}/static/plugins/layer/2.1/layer.js"></script>
	<script src="${jypath}/resources/js/ajaxfileupload.js" type="text/javascript"></script>
	<script src="${jypath}/static/js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</head>
<body>
<form id="premises_form">
<div class="loadinfor">

	<div class="maintt">组团基本信息<a class="power open"></a></div>
	<div class="editetablewrap"> 
		<table class=" editetable inputin tipsrighttable">
			<tr>
       			<td>
              		<div class="innerinputwrap innermiddle"> 
	                    <p class=" ttleft tt">父节点： </p>
	                    <p class="rightinput" style="line-height: 34px;"> 
                      		<label id="parentName" name="parentName">${project.projectName}</label>
                      	</p>
                 	</div>
            	</td>
       		</tr>
     		<tr>
          		<td> <!--当现实错误时候td上加class errorshow-->
                	<div class="innerinputwrap innermiddle"> 
	                    <p class=" ttleft tt">组团名称：</p>
	                    <p class="rightinput"> 
	                        <input name="groupName" class="input_txt" type="text" maxlength="50" value="${premises.groupName}" valid='true' />
	                    </p>
	                    <p class="tip red">*请输入正确名称 </p>
              		</div>
        		</td>
      		</tr>
            <tr>
               	<td> 
             		<div class="innerinputwrap innermiddle"> 
                 		<p class=" ttleft tt">组团编号：</p>
                       	<p class="rightinput"> 
                           	<input name="premisesCode" id="premisesCode" class="input_txt" type="text" placeholder=" 请输入组团编号" maxlength="200" value="${premises.premisesCode}"/>
                       	</p>
                       	<p class=" tip red"> *请输入正确名称 </p>
                   	</div>
        		</td>
           	</tr>
            <tr>
         		<td>
                    <div class="innerselectwrap innermiddle "> 
                        <p class=" ttleft tt"> 产品类型： </p>
                        <p class="rightselect hasunit"> 
                            <select class=" input_txt" name="projectType"> 
                               	<option value=""> 请选择 </option>
                               	<c:forEach var="rowEnum"   items="${projectTypes}">
								<option value="${rowEnum.no}"
									<c:if test="${rowEnum.no==premises.projectType}">selected="selected"</c:if>
									>${rowEnum.des}
								</option>
                               	</c:forEach>
                          	</select>
                            <span class="unit select"></span>
                        </p>
                       	<p class=" tip red"> *产品类型 </p>
                    </div>
                </td>
            </tr>
       		<tr>
           		<td>
               		<div class="innerinputwrap innermiddle "> 
                 		<p class=" ttleft tt"> 容积率： </p>
                    	<p class="rightinput hasunit"> 
                        	<input name="plotRatio" class="input_txt" type="text"  value="${premises.plotRatio}" valid='decimal'/>
                          	<span class="unit"></span>
                       	</p>
                      	<p class=" tip red"> *请输入正确容积率 </p>
                 	</div>
               	</td>
         	</tr>
          	<tr>
          		<td>
              		<div class="innerinputwrap innermiddle "> 
                  		<p class=" ttleft tt"> 绿化率： </p>
                      	<p class="rightinput hasunit"> 
                       		<input name="greeningRate" class="input_txt" type="text" value="${premises.greeningRate}" valid='decimal'/>
                          	<span class="unit"> % </span>
                      	</p>
                      	<p class=" tip red"> *请输入一个非负数 </p>
               		</div>
               	</td>
           	</tr>
          	<tr>
           		<td>
               		<div class="innerinputwrap innermiddle "> 
                    	<p class=" ttleft tt"> 占地面积： </p>
                     	<p class="rightinput hasunit"> 
                       		<input name="floorSpace" class="input_txt" type="text" placeholder="如76.50" value="${premises.floorSpace}"/>
                           	<span class="unit" style=" width:6em;"> 万平方米 </span>
                      	</p>
                      	<p class=" tip red"> *请输入一个非负数 </p>
                 	</div>
      			</td>
        	</tr>
         	<tr>
            	<td>
               		<div class="innerinputwrap innermiddle "> 
	                   	<p class=" ttleft tt"> 总户数： </p>
	                  	<p class="rightinput hasunit"> 
                        	<input name="householdsTotal" class="input_txt" type="text" placeholder="请输入" value="${premises.householdsTotal}" valid='number' />
                        	<span class="unit"> 户 </span>
                      	</p>
                      	<p class=" tip red"> *请输入一个非负数 </p>
                	</div>
           		</td>
         	</tr>
        	<tr>
           		<td>
               		<div class="innerinputwrap innermiddle "> 
                  		<p class=" ttleft tt"> 车位数： </p>
                     	<p class="rightinput hasunit"> 
                       		<input name="carportTotal" class="input_txt" type="text" placeholder="请输入" value="${premises.carportTotal}" valid='number' />
                       		<span class="unit"> 个 </span>
                  		</p>
                      	<p class=" tip red"> *请输入一个非负数 </p>
                 	</div>
              	</td>
          	</tr>
          	<tr>
             	<td>
                	<div class="innerinputwrap innermiddle "> 
                 		<p class=" ttleft tt"> 车位配比： </p>
                   		<p class="rightinput"> 
							<input name="carportMatching" class="input_txt" type="text" placeholder="请输入" value="${premises.carportMatching}"/>
                     	</p>
                     	<p class=" tip red"> *请输入一个非负数 </p>
                 	</div>
              	</td>
         	</tr>
         	<tr>
             	<td>
               		<div class="innerinputwrap innermiddle "> 
                  		<p class=" ttleft tt"> 销售热线： </p>
                     	<p class="rightinput"> 
                      		<input name="salesHotline" class="input_txt" type="text" placeholder="请输入" value="${premises.salesHotline}" />
                      	</p>
                     	<p class=" tip red"> *请输入一个非负数 </p>
                  	</div>
              	</td>
           	</tr>
          	<tr>
           		<td>
              		<div class="innerinputwrap innermiddle "> 
                   		<p class=" ttleft tt"> 产权年限： </p>
                    	<p class="rightinput"> 
                     		<input name="propertyYear" class="input_txt" type="text" placeholder="请输入" valid='number' value="${premises.propertyYear}"/>
                      	</p>
                    	<p class=" tip red"> *请输入一个非负数 </p>
                   	</div>
              	</td>
        	</tr>
			<tr>
            	<td>
                	<div class="innerinputwrap innermiddle "> 
                    	<p class=" ttleft tt"> 建造进度： </p>
                       	<p class="rightinput"> 
                       		<input name="buildingSchedule" class="input_txt" type="text" placeholder="请输入" value="${premises.buildingSchedule}"/>
                       	</p>
                      	<p class=" tip red"> *请输入一个非负数 </p>
					</div>
				</td>
          	</tr>
         	<tr>
           		<td>
              		<div class="innerinputwrap innermiddle "> 
                    	<p class=" ttleft tt"> 开工时间： </p>
                    	<p class="rightinput hasunit"> 
                        	<input name="startTime" class="input_txt" type="text" onclick="WdatePicker()" value="<fmt:formatDate value="${premises.startTime}" pattern="yyyy-MM-dd"/>" />
                         	<span class="Wdate unit">  </span>
                       	</p>
                    	<p class=" tip red"> *请输入正确开工时间 </p>
                  	</div>
           		</td>
           	</tr>
          	<tr>
              	<td>
                	<div class="innerselectwrap innermiddle "> 
                  		<p class=" ttleft tt"> 交付情况： </p>
                      	<p class="rightselect hasunit"> 
                      		<select class=" input_txt" name="deliveryFlag"> 
                        		<option value=""> 请选择 </option>
                          		<c:forEach var="rowEnum"   items="${deliveryStatusEnums}">
									<option value="${rowEnum.no}"
										<c:if test="${rowEnum.no==premises.deliveryFlag}">selected="selected"</c:if>
									>${rowEnum.des}
									</option>
                             	</c:forEach>
                           	</select>
                       		<span class="unit select">  </span>
                      	</p>
                     	<p class=" tip red"> *请输入正确交付情况</p>
                	</div>
            	</td>
        	</tr>
          	<tr>
            	<td>
                	<div class="innerinputwrap innermiddle "> 
                    	<p class=" ttleft tt"> 交付日期： </p>
                       	<p class="rightinput hasunit"> 
							<input name="deliveryDate" class="input_txt" type="text" onclick="WdatePicker()" value="<fmt:formatDate value="${premises.deliveryDate}" pattern="yyyy-MM-dd"/>" />
                          	<span class="Wdate unit">  </span>
						</p>
						<p class=" tip red">*请输入正确交付日期</p>
               		</div>
            	</td>
          	</tr>
                <tr>
                    <td>
                        <div class="innerselectwrap innermiddle "> 
                            <p class=" ttleft tt"> 装修标准： </p>
                            <p class="rightselect hasunit"> 
                                <select id="renovationType" name="renovationType" class=" input_txt" onchange="renovationTypeChange()" > 
                                   <c:forEach var="rowEnum"   items="${renovationTypeEnums}">
										<option value="${rowEnum.no}" 
										<c:if test="${rowEnum.no==premises.renovationType}">selected="selected"</c:if>>${rowEnum.des}</option>
                                   </c:forEach>
								</select>
                                <span class="unit select">  </span>
                            </p>
                            <p class=" tip red"> *请输入正确城市 </p>
                        </div>
                    </td>
                    
                </tr>
                <tr id="renovationDesc" <c:if test="${premises.renovationType!=2}">style="display: none"</c:if>>
                    <td> 
                        <div class="innerinputwrap innermiddle"> 
                            <p class=" ttleft tt"> &nbsp; </p>
                            <p class="rightinput"> 
                                <input maxlength="50" name="renovationDesc" value="${premises.renovationDesc}"  class="input_txt" type="text" placeholder="请输入其它装修标准"/>
                            </p>
                            <p class=" tip red"> *请输入正确 </p>
                        </div>
                    </td>
                    
                </tr>
          	<tr>
          		<td>
              		<div class="innerselectwrap innermiddle "> 
                     	<p class=" ttleft tt"> 销售情况： </p>
                     	<p class="rightselect hasunit"> 
                       		<select class=" input_txt" name="salesStatus"> 
                           		<option value=""> 请选择 </option>
                              	<c:forEach var="rowEnum"   items="${salesStatusEnums}">
									<option value="${rowEnum.no}"
										<c:if test="${rowEnum.no==premises.salesStatus}">selected="selected"</c:if>
										>${rowEnum.des}
										</option>
                             	</c:forEach>
                         	</select>
                      		<span class="unit select">  </span>
                       	</p>
                      	<p class=" tip red"> *请输入正确城市 </p>
                 	</div>
           		</td>
       		</tr>
         	<tr>
          		<td>
              		<div class="innerinputwrap innermiddle "> 
                   		<p class=" ttleft tt"> 预售证编号： </p>
                      	<p class="rightinput"> 
                       		<input name="salesPermissionNo" class="input_txt" type="text" placeholder="请输入" value="${premises.salesPermissionNo}" />
                      	</p>
                 	</div>
             	</td>
         	</tr>
         	<tr>
           		<td>
               		<div class="innerinputwrap innermiddle "> 
                    	<p class=" ttleft tt"> 预售证领取日期： </p>
                      	<p class="rightinput hasunit">
                      		<input name="salesPermissionDate" class="input_txt" type="text" onclick="WdatePicker()" value="<fmt:formatDate value="${premises.salesPermissionDate}" pattern="yyyy-MM-dd"/>" />
                          	<span class="Wdate unit">  </span>
                     	</p>
                      	<p class=" tip red"> *请输入正确容积率 </p>
                  	</div>
               	</td>
           	</tr>
   		</table>
  	</div>

	<div class="maintt">组团详情<a class="power open"></a> </div>
	<div class="editetablewrap">
 		<table class=" editetable tipsdowntable inputin">
       		<tr>
          		<td>
               		<div class="innerselectwrap innermiddle "> 
                    	<p class=" ttleft tt"> 物业类型： </p>
                       	<p class="rightselect hasunit"> 
                     		<select class="input_txt" name="tenementType"> 
                           		<option value=""> 请选择 </option>
                            	<c:forEach var="rowEnum"   items="${tenementTypeEnums}">
									<option value="${rowEnum.no}"
										<c:if test="${rowEnum.no==projectPremisesInfo.tenementType}">selected="selected"</c:if>
										>${rowEnum.des}
									</option>
                             	</c:forEach>
                           	</select>
                          	<span class="unit select">  </span>
                       	</p>
                      	<p class=" tip red"> *请选择物业类型</p>
                 	</div>
              	</td>
         	</tr>
           	<tr>
              	<td>
                	<div class="innerinputwrap innermiddle "> 
                      	<p class=" ttleft tt"> 总建筑面积： </p>
                     	<div class="rightinput hasunit"> 
                          	<input name="overallFloorage" class="input_txt" type="text" value="${projectPremisesInfo.overallFloorage}" valid='decimal'/>
                         	<span class="unit"> m<sup>2</sup> </span>
                           	<div class="subinput"> 
                             	<div class="innerinputwrap innermiddle "> 
                                  	<div class=" ttleft tt"> 地上面积： </div>
                                  	<div class="rightinput hasunit"> 
                                   		<input name="groundArea" class="input_txt" type="text" value="${projectPremisesInfo.groundArea}" valid='decimal'/>
                                     	<span class="unit"> m<sup>2</sup> </span>
                                  	</div>
                                 	<div class=" tip red"> *请输入正确地上面积</div>
                            	</div>
                              	<div class="innerinputwrap innermiddle "> 
                                	<div class=" ttleft tt"> 地下面积： </div>
                                   	<div class="rightinput hasunit"> 
                                     	<input name="undergroundArea" class="input_txt" type="text" value="${projectPremisesInfo.undergroundArea}" valid='decimal'/>
                                     	<span class="unit"> m<sup>2</sup> </span>
                                   	</div>
                                  	<div class=" tip red"> *请输入正确地下面积</div>
                               	</div> 
                              	<div class="innerinputwrap innermiddle "> 
                                	<div class=" ttleft tt"> 可出租面积： </div>
                                  	<div class="rightinput hasunit"> 
                                     	<input name="rentableArea" class="input_txt" type="text" value="${projectPremisesInfo.rentableArea}" valid='decimal'/>
                                  		<span class="unit"> m<sup>2</sup> </span>
                                   	</div>
                                	<div class=" tip red"> *请输入可出租面积</div>
                              	</div> 
                             	<div class="innerinputwrap innermiddle "> 
                                	<div class=" ttleft tt"> 自用面积： </div>
                                 	<div class="rightinput hasunit"> 
	                                  	<input name="ownArea" class="input_txt" type="text" value="${projectPremisesInfo.ownArea}" valid='decimal'/>
	                                   	<span class="unit"> m<sup>2</sup> </span>
                                  	</div>
                               		<div class=" tip red"> *请输入正确自用面积</div>
                             	</div> 
                        	</div>
                     	</div>
                      	<p class=" tip red"> *请输入正确总建筑面积</p>
                	</div> 
                 	<div class="innerinputwrap innermiddle mt10 "> 
                     	<p class=" ttleft tt"> 地下停车场： </p>
                      	<div class="rightinput hasunit"> 
                         	<input name="undergroundParkingArea" class="input_txt" type="text" value="${projectPremisesInfo.undergroundParkingArea}" valid='decimal'/>
                        	<span class="unit"> m<sup>2</sup> </span>
	                    	<div class="subinput"> 
	                              	<div class="innerinputwrap innermiddle "> 
                                	<div class=" ttleft tt"> 数量： </div>
                                  	<div class="rightinput hasunit"> 
                                     	<input name="undergroundParkingNum" class="input_txt" type="text"  value="${projectPremisesInfo.undergroundParkingNum}" valid='number'/>
                                      	<span class="unit"> 个 </span>
                                  	</div>
                                  	<div class=" tip red"> *请输入正确数量</div>
                              	</div>
                           	</div>
                      	</div>
                      	<p class=" tip red"> *请输入正确地下停车场面积</p>
                  	</div> 
                	<div class="innerinputwrap innermiddle mt10 "> 
                      	<p class=" ttleft tt"> 绿化面积： </p>
                      	<div class="rightinput hasunit"> 
                           	<input name="greenSpace" class="input_txt" type="text" value="${projectPremisesInfo.greenSpace}" valid='decimal'/>
                           	<span class="unit"> m<sup>2</sup> </span>
                      	</div>
                     	<p class=" tip red"> *请输入正确绿化面积</p>
                 	</div>  
             	</td>
              	<td></td>
             	<td>
                	<div class="innerinputwrap innermiddle mt10 "> 
                      	<p class=" ttleft tt">住宅建筑面积： </p>
                      	<div class="rightinput hasunit"> 
                         	<input class="input_txt" type="text" name="housingArea" value="${projectPremisesInfo.housingArea}" valid='decimal'/>
                         	<span class="unit"> m<sup>2</sup> </span>
                      	</div>
                      	<p class=" tip red"> *请输入正确住宅建筑面积</p>
                  	</div>  
                 	<div class="innerinputwrap innermiddle mt10 "> 
                      	<p class=" ttleft tt"> 四至边界： </p>
                     	<div class="rightinput hasunit"> 
                       		<input class="input_txt" type="text" name="fourBorder" value="${projectPremisesInfo.fourBorder}"/>
                      	</div>
                      	<p class=" tip red">*请输入正确四至边界</p>
                	</div>  
                	<div class="innerinputwrap innermiddle mt10 "> 
                     	<p class=" ttleft tt"> 停车位： </p>
                     	<div class="rightinput hasunit"> 
                        	<input class="input_txt" type="text" name="parking" value="${projectPremisesInfo.parking}" valid='number' />
                          	<span class="unit"> 个 </span>
                          	<div class="subinput"> 
                             	<div class="innerinputwrap innermiddle "> 
                               		<div class=" ttleft tt"> 地上机动车位： </div>
                                 	<div class="rightinput hasunit"> 
                                    	<input class="input_txt" type="text" name="groundMotor" value="${projectPremisesInfo.groundMotor}" valid='number'/>
                                   		<span class="unit"> 个 </span>
                                  	</div>
                                  	<div class=" tip red"> *请输入正确地上机动车位</div>
                              	</div>
                             	<div class="innerinputwrap innermiddle "> 
                                	<div class=" ttleft tt"> 地下机动车位： </div>
                                	<div class="rightinput hasunit"> 
                                    	<input class="input_txt" type="text" name="undergroundMotor" value="${projectPremisesInfo.undergroundMotor}" valid='number' />
                                    	<span class="unit"> 个 </span>
                                  	</div>
                                  	<div class=" tip red"> *请输入正确地下机动车位</div>
                              	</div>
                              	<div class="innerinputwrap innermiddle "> 
                                 	<div class=" ttleft tt"> 地上非机动车位： </div>
                                  	<div class="rightinput hasunit"> 
                                     	<input class="input_txt" type="text" name="groundNonMotor" value="${projectPremisesInfo.groundNonMotor}" valid='number' />
                                   		<span class="unit"> 个 </span>
                                  	</div>
                                 	<div class=" tip red"> *请输入正确地上非机动车位</div>
                              	</div>
                             	<div class="innerinputwrap innermiddle "> 
                                 	<div class=" ttleft tt"> 地下非机动车位： </div>
                                  	<div class="rightinput hasunit"> 
                                    	<input class="input_txt" type="text" name="undergroundNonMotor" value="${projectPremisesInfo.undergroundNonMotor}" valid='number' />
                                   		<span class="unit"> 个 </span>
                                	</div>
                                	<div class=" tip red"> *请输入正确地下非机动车位</div>
                            	</div>
                        	</div>
                     	</div>
                    	<p class=" tip red"> *请输入正确停车位</p>
                	</div> 
             	</td>
        	</tr>
			<tr>
                <td>
               		<div class="innerinputwrap innermiddle "> 
                    	<p class=" ttleft tt"> 总户数： </p>
                       	<p class="rightinput"> 
                          	<input name="totalHouse" class="input_txt" type="text" value="${projectPremisesInfo.totalHouse}" valid='number'/>
                     	</p>
                     	<p class=" tip red"> *请输入一个非负数 </p>
                	</div>  
             	</td>
             	<td> </td>
              	<td>
                  	<div class="innerinputwrap innermiddle "> 
                     	<p class=" ttleft tt"> 常住人口数： </p>
                      	<p class="rightinput"> 
                        	<input name="permanentPopulation" class="input_txt" type="text" value="${projectPremisesInfo.permanentPopulation}" valid='number'/>
                    	</p>
                  		<p class=" tip red"> *请输入一个非负数 </p>
                 	</div>  
              	</td>
          	</tr>
           	<tr>
              	<td>
                 	<div class="innerinputwrap innermiddle "> 
                      	<p class=" ttleft tt"> 总人口数： </p>
                      	<p class="rightinput"> 
                       		<input name="totalPopulation" class="input_txt" type="text" value="${projectPremisesInfo.totalPopulation}" valid='number'/>
                      	</p>
                    	<p class=" tip red"> *请输入一个非负数 </p>
              		</div>  
              	</td>
            	<td> </td>
               	<td>
                  	<div class="innerinputwrap innermiddle "> 
                     	<p class=" ttleft tt"> 暂住人口数： </p>
                     	<p class="rightinput"> 
                        	<input name="temporaryPopulation" class="input_txt" type="text" value="${projectPremisesInfo.temporaryPopulation}" valid='number'/>
						</p>
                    	<p class=" tip red">*请输入一个非负数 </p>
                	</div>  
            	</td>
          	</tr>
         	<tr>
              	<td colspan="3">
              		<div class="innerinputwrap innermiddle "> 
                    	<p class=" ttleft tt">备注： </p>
                      	<p class="rightinput"> 
                       		<textarea rows="2" cols="10" maxlength="100" name="remark" multiline="true" class="FormElement ui-widget-content ui-corner-all isSelect147" style="width: 100%;">${projectPremisesInfo.remark}</textarea>
                      	</p>
                  	</div>  
              	</td>
      		</tr>
 		</table>
	</div>

		<div class="downbtnwrap">
			<a class=" btn btn_blue" onclick="savaData()"> 保存 </a>
			<a class=" btn btn_white ml50" onclick="backProject()"> 返回 </a>
		</div>
	</div>
	<input type="hidden" name="projectId" value="${project.id}" />
	<input type="hidden" name="id" value="${premises.id}"/>
	<input type="hidden" name="projectInfoId" value="${projectPremisesInfo.id}" />
	<input type="hidden" name="premisesId" value="${premises.id}" id="idKey" />
</form>


<script>
    function backProject(){
    	var url="${jypath}/estate/project/index";
    	window.location.href=url;
    }

    $(function () {
        //隐藏展示Panel
        $(".maintt").click(function () {
            if ($(this).next(".editetablewrap").is(":hidden")) {
                $(".editetablewrap").hide();
                $(this).next(".editetablewrap").show();
                $(".power").removeClass("open");
                $(this).find(".power").addClass("open");
            } else {
                $(".editetablewrap").hide();
                $(".power").removeClass("open");
            }
        });
    });
  	
    function savaData(){
    	var valid = $(".input_txt");
    	for(var i=0;i<valid.length;i++){
    		var value = valid.eq(i).val();
    		if(valid.eq(i).attr("valid")=='true'){
    			if(value==null||value==""||value=="-1"){
    				valid.eq(i).focus();
    				layer.tips('必填项', valid.eq(i));
    				return;
    			}
    		}else if(valid.eq(i).attr("valid")=='number'){
    			if(value!=null&&value!=""){
    				var reg = /^\+?(0|[1-9][0-9]*)$/;
    				if(!reg.test(value)){
        				valid.eq(i).focus();
    					layer.tips("请输入一个整数!",valid.eq(i));
    					return;
    				}
    			}
    		}else if(valid.eq(i).attr("valid")=='decimal'){
    			var reg = /^\d+(.\d{1,2})?$/;
    			if(value!=null&&value!=""){
    				if(!reg.test(value)){
    	    			valid.eq(i).focus();
      					layer.tips("请输入一个数字,可保留两位小数!",valid.eq(i));
      					return;
      				}
    			}
    		}
		}
    	$.ajax({
    		type: 'post',
            url: "${jypath}/estate/projectPremises/edit",
    	    data: $("#premises_form").serialize(),
    	    dataType:'json',
    	    success: function(res){
    	    	if(res.res=="1"){
    	    		var idKey=$("#idKey").val();
    	    		var successMsg="";
    	    		if(idKey!=""){
    	    			successMsg="修改成功";
    	    		}else{
    	    			successMsg="新增成功";
    	    		}
    	    		layer.confirm(successMsg, {
    	    		   btn: ['确定'] //按钮
    	    		}, function(){
    	    			backProject();
    	    		});
    	    	}else if(res.res=="100"){
    	    		layer.alert("权限不足！")
    	    	}else{
    	    		layer.alert(res.resMsg);
    	    	}
    	    }
    	}); 
    }
    
    //切换单选按钮
    function clickSelect(currObj,name){
    	$("em[name='"+name+"Check']").each(function(index,obj){
    		$(obj).removeClass("icon_radio_checked");
    	});
    	$(currObj).addClass("icon_radio_checked");
    	var checkValue=$(currObj).attr("checkValue")
    	$("#"+name).val(checkValue);
    	console.log($("#"+name).val());
    	
    }
    
    function renovationTypeChange(){
    	var values = $("#renovationType").val();
    	if(values==2){
    		$("#renovationDesc").show();
    	}else{
    		$("#renovationDesc").hide();
    	}
    }
</script>
  <script type="text/javascript" src="${jypath}/static/js/strip.min.js?v=${jsVersion}"></script>
</body>
</html>
